package com.nbsaas.boot.cms.data.entity;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.Comment;

@CreateByUser
@ComposeView
@Data
@FormAnnotation(title = "文章标签", model = "文章标签")
@Entity
@Table(name = "bs_article_tag")
@Comment("文章标签表")
public class ArticleTag extends AbstractEntity {

    @Comment("标签名称")
    @SearchItem(name = "name", key = "name", label = "标签名称")
    @FormField(title = "标签名称", sortNum = "1", grid = true, required = true)
    @Column(length = 100, nullable = false, unique = true)
    private String name;

    @Comment("标签描述")
    @FormField(title = "标签描述", sortNum = "2", type = InputType.textarea)
    @Column(length = 500)
    private String description;

    @Comment("标签颜色")
    @FormField(title = "标签颜色", sortNum = "3")
    @Column(length = 20)
    private String color;

    @Comment("标签图标")
    @FormField(title = "标签图标", sortNum = "4", type = InputType.image)
    @Column(length = 500)
    private String icon;

    @Comment("排序")
    @FormField(title = "排序", sortNum = "5", grid = true, type = InputType.el_input_number, sort = true)
    private Integer sort;

    @Comment("是否显示")
    @FormField(title = "是否显示", sortNum = "6", grid = true, type = InputType.select)
    private Boolean visible;

    @Comment("使用次数")
    @FormField(title = "使用次数", sortNum = "7", grid = true, type = InputType.el_input_number, sort = true)
    private Integer useCount;

    @Comment("SEO标题")
    @FormField(title = "SEO标题", sortNum = "8")
    @Column(length = 200)
    private String seoTitle;

    @Comment("SEO关键词")
    @FormField(title = "SEO关键词", sortNum = "9")
    @Column(length = 500)
    private String seoKeywords;

    @Comment("SEO描述")
    @FormField(title = "SEO描述", sortNum = "10")
    @Column(length = 1000)
    private String seoDescription;
} 